<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div>
        <input type="text" x-webkit-speech onwebkitspeechchange="foo()" />
    </div>
    <script src="./vconsole.min.js"></script>
    <script>var vConsole = new VConsole();</script>
    <script>
       

        function foo() {
            console.log("说话。。")
        }
        
if (document.createElement("input").webkitSpeech === undefined) {    
 alert("Speech input is not supported in your browser.");    
}
    </script>
</body>

</html>